/**
 * Created by Hata Kokoro on 6/28/2017.
 */

var Poker=require('../Poker/Poker.js');
/*
How to generate Dealer
 */
var enum_DealerRules={
    byRandom:"BY_RANDOM",// according to server raDealerRules={ndom
    byBet:"BY_ROB",// according to each players' bet
    byRotate:"by_ROTATE",// according to players' themself
}

var ColorCompareValue = {}
ColorCompareValue[Poker.Color.SPADE] = 1;
ColorCompareValue[Poker.Color.CLUB] = 2;
ColorCompareValue[Poker.Color.HEART] = 3;
ColorCompareValue[Poker.Color.SPADE] = 4;

var enum_Pattern={
    DRAGON:0x0F,
    BOMB:0x0E,
    FIVE_CALF:0x0D,
    GOLDEN_COW:0x0C,
    SLIVER_COW:0x0B,
    N10:0x0A,
    N9:0x09,
    N8:0x08,
    N7:0x07,
    N6:0x06,
    N5:0x05,
    N4:0x04,
    N3:0x03,
    N2:0x02,
    N1:0x01,
    NORMAL:0x00,
}

var ScoreTable={};
ScoreTable[enum_Pattern.NORMAL]=1;
ScoreTable[enum_Pattern.N1]=1;
ScoreTable[enum_Pattern.N2]=1;
ScoreTable[enum_Pattern.N3]=1;
ScoreTable[enum_Pattern.N4]=1;
ScoreTable[enum_Pattern.N5]=1;
ScoreTable[enum_Pattern.N6]=1;
ScoreTable[enum_Pattern.N7]=2;
ScoreTable[enum_Pattern.N8]=2;
ScoreTable[enum_Pattern.N9]=2;
ScoreTable[enum_Pattern.N10]=3;
ScoreTable[enum_Pattern.SLIVER_COW]=4;
ScoreTable[enum_Pattern.GOLDEN_COW]=5;
ScoreTable[enum_Pattern.FIVE_CALF]=6;
ScoreTable[enum_Pattern.BOMB]=7;
ScoreTable[enum_Pattern.DRAGON]=8;

exports.DealerRules=enum_DealerRules;
exports.Pattern=enum_Pattern;
exports.ScoreTable=ScoreTable;
exports.Color=ColorCompareValue;

